#ifndef FORTE_GCC_OUTPUT_PROCESSOR_HPP
#define FORTE_GCC_OUTPUT_PROCESSOR_HPP

#include "executor.hpp"

#include <string>

namespace Forte
{
  struct CompilerOutputListener
  {
    virtual void OnError(std::string const& error, 
                         std::string const& filename, 
                         unsigned line) = 0;
    virtual void OnWarning(std::string const& error,
                           std::string const& filename,
                           unsigned line) = 0;
  };

  class GccOutputProcessor : public ExecutionListener
  {
  public:
    GccOutputProcessor(CompilerOutputListener& listener);

    void OnExecutionOutput(char const* line, std::size_t length);
  private:
    CompilerOutputListener& mListener;
  };
}

#endif /* FORTE_GCC_OUTPUT_PROCESSOR_HPP */

